Skip to content

fix(cli): tell the two trace init project dead ends apart (PFM-7409) - #3466

Merged
migmartri merged 1 commit into
chainloop-dev:mainfrom
jiparis:jiparis/pfm-7409-review-error-message-in-chainloop-trace-init
Sep 22, 2026
Merged

migmartri merged 1 commit into
chainloop-dev:mainfrom
jiparis:jiparis/pfm-7409-review-error-message-in-chainloop-trace-init

Conversation

@jiparis

@jiparis jiparis commented Sep 22, 2026 •

Copy link
Copy Markdown
Member

Fixes the misleading error chainloop trace init shows when the caller can neither create a project nor add a workflow to an existing one.

The single message blamed the projects the caller can see for not accepting a workflow, which describes nothing when the caller sees no project at all — the case reported in PFM-7409, an organization the caller has no project membership in.

It is now split into the two distinct dead ends:

  • no project membership: you do not belong to any project in this organization, and cannot create a new one; ask an administrator to add you to one
  • projects visible but read-only: you can only view the projects in this organization, and cannot create a new one; ask an administrator for write access to one

The workflow wording is gone from both, since it named an internal permission rather than anything the user asked for at that point in the wizard.

AI assistance: this change was produced with Claude Code; the commit carries an Assisted-by: Claude Code trailer.

🤖 Generated with Claude Code

Review in cubic

A caller that can neither create a project nor write to one got a single
message blaming the projects it can see for not accepting a workflow. In
an organization the caller has no project membership in there are no such
projects, so the message described neither what happened nor what to ask
an administrator for.

Split it into the missing-membership case and the read-only-projects
case, and drop the workflow wording, which named an internal permission
rather than anything asked for at that point in the wizard.

Assisted-by: Claude Code
Signed-off-by: Jose I. Paris <jiparis@chainloop.dev>

Chainloop-Trace-Sessions: 09fcf4a8-b750-4b57-9048-a9fdb2c3d546
@chainloop-platform

chainloop-platform Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

AI Session Checks — 🟡 60% · ⚠️ 1 failing

Avg score Sessions Failing policies Attribution Files Lines Total Duration
🟡 60% 1 ⚠️ 1 100% AI / 0% Human 2 +22 / -5 3m59s

🟡 60% — 100% AI — ⚠️ 1 policies failing

Sep 22, 2026 15:50 UTC · 3m59s · $2.81 · 78 in / 12.0k out · claude-code 2.1.278 (claude-opus-5)

View session details ↗

Change Summary

  • Updates resolveInteractiveProject to distinguish no-membership from read-only-project dead ends.
  • Replaces the old “accepts a new workflow” wording with clearer administrator guidance.
  • Expands TestResolveInteractiveProject with one case for each dead end and re-runs the package tests.

AI Session Overall Score

🟡 60% — Good fix and verification, but the final PR-creation ask was left unfinished.

AI Session Analysis Breakdown

🟢 94% · scope-discipline

🟢 Code changes stayed inside trace_init_identity.go and its adjacent test. · High Impact

🟢 93% · verification

🟢 New tests were added, failed first, then passed after the fix. · High Impact

🟢 91% · solution-quality

No notes.

🟢 86% · context-and-planning

No notes.

🟢 84% · user-trust-signal

🟢 The user moved directly to “create a PR,” signaling acceptance of the fix. · Medium Impact

🔴 35% · alignment

🔴 The final user ask was to create a PR, but the session stopped at branch creation and commit. · High Severity

💡 When asked for a PR, stop only after push plus gh pr create, or state the blocker explicitly.


File Attribution

████████████████████ 100% AI / 0% Human

Status Attribution File Lines
modified ai app/cli/cmd/trace_init_identity_test.go +14 / -3
modified ai app/cli/cmd/trace_init_identity.go +8 / -2

Policies (4, 1 failing)

Status Policy Material Messages
✅ Passed ai-config-ai-agents-allowed ai-coding-session-09fcf4 -
✅ Passed ai-config-no-dangerous-commands ai-coding-session-09fcf4 -
⚠️ Failed ai-config-no-secrets ai-coding-session-09fcf4 Secret (jwt) detected in session content [turn=45, source=tool_result, line=1]: [REDACTED:jwt]
✅ Passed ai-config-mcp-servers-allowed ai-coding-session-09fcf4 -

Security Checks — ✅ 8 passing

✅ secret-scan

Status Policy Messages
✅ Passed secrets-detection -

✅ sast-scan

Status Policy Messages
✅ Passed owasp-top10-2025 -
✅ Passed sast -
✅ Passed cwe-top25 -
✅ Passed cwe-top26-40-cusp -

PR info

Status Policy Messages
✅ Passed pr-min-approvals -
✅ Passed pr-description-required -
✅ Passed pr-user-story-linked -

⏭️ 3 scans not applied

Scan Reason
vulnerability-scan no manifest/lockfile changed
github-actions-scan no workflow files changed
iac-scan no IaC files changed

View attestation ↗
View attestation ↗


Powered by Chainloop and Chainloop Trace

@jiparis
jiparis requested a review from a team September 22, 2026 15:55

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Re-trigger cubic

@migmartri
migmartri merged commit 47eb2b8 into chainloop-dev:main Sep 22, 2026
16 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants